﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ParkService.Core
{
    public class Message
    {
        public Message(int hub_id, string ip)
        {
            this.hub_id = hub_id;
            this.ip = ip;
        }
        public Message(int hub_id, string ip, string key, string body)
        {
            this.hub_id = hub_id;
            this.ip = ip;
            this.key = key;
            this.body = body;
        }
        public int hub_id { get; set; }

        public string ip { get; set; }

        public string key { get; set; }

        public string body { get; set; }

        public override string ToString()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this);
        }
    }
}
